<template>
  <div id="app">
    <router-view :key="$route.fullPath" />
  </div>
</template>


<script>
let CONSTANT = require('../src/constant/constant.js'),
    common = require('../src/common.js');
export default {
  name: 'app',
    data () {
    return {
      companyName:'创巢'
    }
  },
  components: {
    
  },
  created(){
    let arr = location.hostname.split('.');
    let urlName = arr[0] == 'www'?arr[1]:arr[0];
    if(urlName != 'fu' && urlName != 'client'){
        this.getChannelName()
    }else{
       window.document.title = this.companyName;
       common.setCookie('companyName',this.companyName)
    }
  },
  mounted() {
      
  },
  methods:{
    getChannelName(){
          let url = CONSTANT.URL.WEB.FINDCHANNELBASEID,
              data = {},
              dataForm = {}
              common.requestAjax(url,JSON.stringify(data),dataForm,(res)=>{
              if(res.status == 200){
                  let companyName = res.data.bussData.companyName
                  this.companyName = companyName;
                  if(companyName == '科荟融'){
                    companyName = 'co-bank 科技贷款首选服务商'
                  }
                  window.document.title = companyName;
                  common.setCookie('companyName',companyName)
              } else {
                  
              }
          })
      },
  }
}
</script>

<style  lang="scss">
html{
  height: 100%;
  font-family: "Alright Sans LP","Avenir Next","Helvetica Neue",Helvetica,Arial,"PingFang SC","Source Han Sans SC","Hiragino Sans GB","Microsoft YaHei","WenQuanYi MicroHei",sans-serif;
}

.template-wrap{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
}

#app{
  position: relative;
}

.title-head{
  display: none!important;
}

ul,li{
      box-sizing: content-box!important;
}

.header .login.name{
  margin-left: 6px;
}

.el-breadcrumb__inner{
  color: #111111!important;
  &.is-link{
    color: #999999!important;
    font-weight: normal;
  }
}

.el-steps--horizontal {
  padding-top: 30px !important;
}

.balance-search{
    .balance-item{
        .file-name{
            display: inline-block;
            font-size: 16px;
            color: #318EE4;
            margin-left: 11px;
        }
        .el-select{
            .el-input{
                width: 145px!important;
            }
        }
    }
}


body{
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
}

#app{
  min-height: 100%;
}

a{
  text-decoration: none;
}

.over-hidden{
  overflow: hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
}

.el-icon-arrow-up.is-reverse:before{
  right: 5px;
}

.el-icon-arrow-up:before{
  content: '' !important;
  transform: rotate(180deg);
  background:url(images/q2.png) 100%;
  position: absolute;
  right: 10px;
  top: 15px;
  width: 10px;
  height: 9px;
  background-repeat: no-repeat;
}

.product-line{
    text-align: center;
}

.content {
  display: flex;
  width: 100% !important;
}

.el-left-menu {
  // overflow: scroll;
}

.el-carousel__arrow {
  background-color: rgba(220, 100, 20, .2) !important;
  border: 1px solid #ED7018 !important;
}

.el-carousel__arrow i {
  color: #ED7018 !important;
}

.el-carousel__arrow:hover {
  background-color: #ED7018 !important;
}

.el-carousel__arrow:hover i {
  color: #ffffff !important;
}

// 流程线和文字上下对调
/*
.el-step__main {
    position: relative;
    top: -30px;
}
.el-step__head {
    position: relative;
    bottom: -30px;
}
*/
//公共
.box {
  display: -webkit-box;
  display: box;
  display: -moz-box;
  /* 老版本 - 适配iOS 6-, Safari 3.1-6 */
  display: -webkit-flex;
  /* 新版本 - 适配Chrome */
  display: flex;
}

.box-pack-center {
  -webkit-box-justify-content:  center;
  -moz-align-justify-content:  center;
  -webkit-align-justify-content: center;
  justify-content:  center;
}

.box-pack-start {
  -webkit-box-justify-content:  flex-start;
  -moz-align-justify-content:  flex-start;
  -webkit-align-justify-content:  flex-start;
  justify-content:  flex-start;
}

.box-pack-end {
  -webkit-box-justify-content:  flex-end;
  -moz-align-justify-content:  flex-end;
  -webkit-align-justify-content:  flex-end;
  justify-content:  flex-end;
}

.box-pack-between {
  -webkit-box-justify-content: space-between;
  -moz-align-justify-content: space-between;
  -webkit-align-justify-content: space-between;
  justify-content: space-between;
}

.box-pack-around {
  -webkit-box-justify-content: space-around;
  -moz-align-justify-content: space-around;
  -webkit-align-justify-content: space-around;
  justify-content: space-around;
}

.box-align-center {
    -webkit-box-align: center;
  -moz-align-items: center;
  -webkit-align-items: center;
  align-items: center;
}

.box-align-start {
  -webkit-box-align: flex-start;
  -moz-align-items: flex-start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
}

.box-align-end {
   -webkit-box-align: flex-end;
  -moz-align-items: flex-end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
}

.over-hidden{
  overflow: hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
}
</style>
